export const optionConfig = (uptime_rate) => {
    return {
        series: {
            type: 'pie',
            clockWise: false,
            radius: ['80%', '90%'],
            hoverAnimation: false,
            silent: true,
            center: ['50%', '50%'],
            data: [
                {
                     value: 100-uptime_rate,
                    //value:100-98.29,
                    label: {
                        show: false
                    },
                    // name: 'invisible',
                    itemStyle: {
                        normal: {
                            color: 'rgb(9,159,209)',
                            borderWidth: 1,
                            borderColor: 'transparent'
                        }
                    }
                },
                {
                     value:uptime_rate,
                    //value:'98.29',
                    label: {
                        normal: {
                            rich: {
                                a: {
                                    color: '#82ffff',
                                    align: 'center',
                                    fontSize: 10,
                                    fontWeight: "bold",
                                    fontFamily: '方正粗倩_GBK'
                                },
                                // b: {
                                //     color: '#08a0df',
                                //     align: 'center',
                                //     fontSize: 25
                                // },
                                // c: {
                                //     fontSize: 15,
                                //     fontFamily:'方正粗倩_GBK',
                                //     fontWeight: "bold"
                                // }
                            },
                            formatter: function (params) {
                                // return "{a|"+params.value+"}"+" {c|%}"+"\n\n{b|利用率}";
                                return "{a|" + params.value + "}" + '%';
                            },
                            position: 'center',
                            show: true,
                            textStyle: {
                                fontSize: 10,
                                fontWeight: 'normal',
                                color: '#82ffff'
                            }
                        }
                    },
                    itemStyle: {
                        normal: {
                            color: '#139FBE',
                            shadowColor: '#82ffff',
                            borderWidth: 2,
                            borderColor: '#82ffff',
                            shadowBlur: 10
                        }
                    }
                }]
        }
    }
}
